package com.chinasoftinc.facommon;

/**
 * FA应用配置
 *
 * @since 2022-04-22
 */
public class FAConfigMgr implements FAAppInfo {
    private FAAppInfo appInfoWrap;

    public static FAConfigMgr get() {
        return InnerClass.INSTANCE;
    }

    public void config(FAAppInfo appInfo) {
        appInfoWrap = appInfo;
    }

    @Override
    public boolean isBleMode() {
        return appInfoWrap.isBleMode();
    }

    @Override
    public boolean isOpenUrlByInternalWeb() {
        return appInfoWrap.isOpenUrlByInternalWeb();
    }

    @Override
    public long getBleConnectTimeOut() {
        return appInfoWrap.getBleConnectTimeOut();
    }

    @Override
    public boolean isDebug() {
        return appInfoWrap.isDebug();
    }

    @Override
    public String getBundleName() {
        return appInfoWrap.getBundleName();
    }

    @Override
    public String getInternalWebPageAbilityName() {
        return appInfoWrap.getInternalWebPageAbilityName();
    }

    @Override
    public String getDeviceAbilityName() {
        return appInfoWrap.getDeviceAbilityName();
    }


    private static final class InnerClass {
        private static final FAConfigMgr INSTANCE = new FAConfigMgr();
    }
}
